@charset "UTF-8";

/** color vars **/
:root {
  /* system vars*/
  --primary-color: #f0f0f0; /* color of primary buttons */
  --side-bar-bg-color: #003444;
  --active-file-bg-color: #004144; /* sidebar active & hover */
  --active-file-text-color: #ffffff;
  --active-file-border-color: #757575;
  --item-hover-text-color: #fff;
  --item-hover-bg-color: #005C44;  /* sidebar footer item hover*/
  --control-text-color: #ddd;
  --control-text-hover-color: #fff;
  --monospace: 'SourceHanSansSC','JetBrains Mono', -apple-system, sans-serif;

  /* custom vars */
  --theme-primary-color: #00997B; /* rgb(0, 153, 123) */
  --white-color: #fff;

  /* head */
  --head-text-color: #333444;
  --h1-text-color: rgba(0, 52, 68, 0.9);
  --h5-text-color: var(--theme-primary-color);
  --h6-text-color: rgba(0, 153, 123, 0.838);
  --head-prefix-color: #D0D0D0;

  /* text */
  --text-color: #363C42;
  --text-search-hit-color: rosybrown;

  /* highlight */
  --highlight-bg-color: #FFF3F3;
  --highlight-text-color: #FF2F2F;

  /* a link */
  --a-text-color: var(--theme-primary-color);

  /* annotate */
  --annotate-text-color: #8CAA16;

  /* inline code */
  --inline-code-bg-color: #f3f3f3;
  --inline-code-text-color: #00769A;

  /* selection */
  --selection-text-color: rgba(0, 153, 123, 0.2);

  /* check-box */
  --checked-text-color: #ADB5BD;
  --line-through-color: #CFD4DA;
  --border-color: #868E96;

  /* table */
  --table-border-color: #DADCDE;
  --table-cell-bg-color:rgba(0, 153, 123, 0.03);

  /* quote */
  --quote-bg-color: rgba(0, 153, 123, 0.05);
  --quote-text-color: #81888D ;

  /* sidebar */
  --sidebar-footer-dropdown-menu-border-color: #212529;
  --sidebar-footer-dropdown-menu-item-border-color: #ADB5BD;
  --sidebar-footer-item-hover-bg-color: #004544;
  --siderbar-dropdown-menu-text-color: #fff;

  /* sidebar resizer */
  --sidebar-resizer: #6eace2;

  /*--window-border: #e5e5e5;*/
  --window-border: #1F6F57; /*sidebar layout border*/
}


/* global && write area */
#write {
  position: static;
  width: 90%;
  max-width: 900px;
  line-height: 1.6;
  padding: 36px 0 70px;
}
html, body, #write {
  background: var(--white-color);
  font-family: 'SourceHanSansSC','JetBrains Mono', -apple-system, sans-serif;
}
p {
  font-size: 1em;
  font-family: 'SourceHanSansSC', 'JetBrains Mono', -apple-system, sans-serif;
  line-height: 1.6;
  color: var(--text-color);
}


/* search match active*/
.md-search-hit.md-search-select{
  background-color: var(--text-search-hit-color);
}


/* heading */
h1, h2, h3, h4, h5, h6 {
  width: auto;
  line-height: 2;
  font-style: normal;
  margin-top: 14px;
  margin-bottom: 14px;
}
h2, h3, h4 {
  color: var(--head-text-color);
}
h2::before, h3::before, h4::before, h5::before, h6::before,
h2.md-focus::before, h3.md-focus::before, h4.md-focus::before, h5.md-focus::before, h6.md-focus::before {
  position: absolute;
  right: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%);
  color: var(--head-prefix-color);
  font-size: 0.8rem;
  font-weight: bold;
  font-variant: 'small-caps';
  line-height: 2;
  padding: 0;
  border: 0;
}

#write h1 {
  font-size: 2.1rem;
  font-weight: 900;
  text-align: center;
  color: var(--h1-text-color);
}
#write h1>span{
  position: relative;
  display: inline-block;
}
#write h1>span:after{
  content: '';
  display: block;
  position: absolute;
  border-top: 3px double var(--h1-text-color);
  height: 3px;
  width: 15rem;
  max-width: 80%;
  left: 50%;
  transform: translateX(-50%);
}

#write h2 {
  font-size: 1.7rem;
  font-weight: 800;
}
#write>h2::before {
  content: 'H2';
}

#write h3 {
  font-size: 1.4rem;
  font-weight: 800;
}
#write>h3::before {
  content: 'H3';
}

#write h4, #write h5, #write h5 {
  font-size: 1.2rem;
  font-weight: bold;
}
#write h5 {
  color: var(--h5-text-color);
}
#write h6 {
  color: var(--h6-text-color);
}
#write>h4::before {
  content: 'H4';
}
#write>h5::before {
  content: 'H5';
}
#write>h6::before {
  content: 'H6';
}


/* inline element */
#write a {
  color: var(--a-text-color);
  cursor: pointer;
  padding: 0 3px 0 3px;
  text-decoration: none;
}
#write a:hover {
  text-decoration: none;
  border-bottom: 1px solid;
}

strong {
  font-weight: 700;
}

mark {
  background: var(--highlight-bg-color);
  color: var(--highlight-text-color);
  font-weight: 500;
  padding: 0 2px 0 2px;
  margin: 0 2px 0 2px;
  border-radius: 2px;
}

span.md-comment {
  color: var(--annotate-text-color);
}

/* footnote */
sup.md-footnote {
  color: var(--a-text-color);
  background-color: var(--white-color);
}
.footnotes .md-def-name {
  padding-right: 4ch;
}

/* inline code */
#write code{
  margin: 0 2px;
  padding: 0px 4px;
  font-size: 0.95rem;
  background: var(--inline-code-bg-color);
  display: inline;
  vertical-align: top;
  line-height: 1.6;
  border-radius: 6px;
  font-weight: 700;
  color: var(--inline-code-text-color);
}
.md-hover-tip .code-tooltip-content, .md-hover-tip .md-arrow:after {
  background: var(--side-bar-bg-color);
}
#write *[mdtype="heading"] code{
  font-size: inherit!important;
  vertical-align: baseline;
}

img {
  margin-top: 0.2rem;
  margin-bottom: 0.2rem;
}
p>.md-image:only-child:not(.md-img-error) img, p>img:only-child {
  display: block;
  margin: unset;
}
/* operation img tip dialog */
#user-context-menu>li>a, .dropdown-menu>li>a {
  color: var(--theme-primary-color);
  font-weight: 500;
}
#user-context-menu>li>a:hover, #user-context-menu>li.active>a {
  background: var(--theme-primary-color);
  color: #fff;
}
#zoom-img-menu.context-menu.dropdown-menu>li>a:hover,
#zoom-img-menu.context-menu.dropdown-menu>li.active>a {
  background: var(--theme-primary-color);
  color: #fff;
}
#zoom-img-menu.dropdown-menu .divider {
  background: var(--theme-primary-color);
}

/* underline */
#write u {
  text-decoration: none;
}
#write u>span {
  border-bottom: 1px solid;
}

/* selection */
span::selection, *::selection {
  background: var(--selection-text-color);
}


/* block element */
/* YAML front */
pre.md-meta-block {
  font-size: .85rem;
  color: var(--quote-text-color);
  background: var(--quote-bg-color);
  padding: 1rem;
  border-radius: 8px;
}

/* toc */
#write .md-toc {
  font-size: 1rem;
}
#write a.md-toc-inner {
  color: var(--theme-primary-color);
}
#write a.md-toc-inner:hover {
  text-decoration: underline;
  border-bottom: none;
}
p.md-toc-content {
  line-height: 1.8;
  font-weight: 500;
}
.md-toc-h2 .md-toc-inner {
  margin-left: 1em;
}
.md-toc-h3 .md-toc-inner {
  margin-left: 2em;
}
.md-toc-h4 .md-toc-inner {
  margin-left: 3em;
}
.md-toc-h5 .md-toc-inner {
  margin-left: 4em;
}
.md-toc-h6 .md-toc-inner {
  margin-left: 5em;
}

/* quote */
blockquote {
  position: relative;
  padding: 1rem;
  background-color: var(--quote-bg-color);
  border-radius: 6px;
  line-height: 1;
}
blockquote p {
  color: var(--quote-text-color);
  margin: 0 ;
}
blockquote::before {
  content: '';
  position: absolute;
  top: 0rem;
  left: 0rem;
  height: 100%;
  width: .30rem;
  background: var(--theme-primary-color);
  border-top-left-radius: 6px;
  border-bottom-left-radius: 6px;
}

/* hr */
div[mdtype='hr'] {
  text-align: center;
}
hr {
  border-top: 1px dashed var(--theme-primary-color);
  transform: scaleY(0.5);
  width: 90%;
}

/* ul, ol */
ul>li>ul>li {
  list-style-type: circle;
}
ul>li>ul>li>ul>li {
  list-style-type: disc;
}
ul>li>ul>li>ul>li>ul>li {
  list-style-type: circle;
}
ul>li>ul>li>ul>li>ul>li>ul>li {
  list-style-type: disc;
}
ul>li>ul>li>ul>li>ul>li>ul>li>ul>li {
  list-style-type: circle;
}

ol ul li {
  list-style-type: circle;
}
ol ul>li>ul>li {
  list-style-type: disc;
}
ol ul>li>ul>li>ul>li {
  list-style-type: circle;
}
ol ul>li>ul>li>ul>li>ul>li {
  list-style-type: disc;
}
ol ul>li>ul>li>ul>li>ul>li>ul>li {
  list-style-type: circle;
}
ol ul>li>ul>li>ul>li>ul>li>ul>li>ul>li {
  list-style-type: circle;
}

ol>li>ol>li {
  list-style-type: lower-alpha;
}
ol>li>ol>li>ol>li {
  list-style-type: decimal;
}
ol>li>ol>li>ol>li>ol>li {
  list-style-type: lower-alpha;
}
ol>li>ol>li>ol>li>ol>li>ol>li {
  list-style-type: decimal;
}
ol>li>ol>li>ol>li>ol>li>ol>li>ol>li {
  list-style-type: lower-alpha;
}
ol>li>ol>li>ol>li>ol>li>ol>li>ol>li>ol>li {
  list-style-type: decimal;
}

/* task list */
.task-list-item.md-task-list-item {
  list-style-type: none;
}
.md-task-list-item>input, #write .md-task-list-item>input[type=checkbox] {
  margin-left: -1.6rem;
  width: 0.5rem;
  height: 0.5rem;
}

.md-task-list-item>input:before {
  border: 2px solid var(--border-color);
  width: 1rem;
  height: 1rem;
  background:  var(--white-color);
  content: ' ';
  transition: background-color 200ms ease-in-out;
  display: block;
}
.md-task-list-item>input:checked:before,
.md-task-list-item>input[checked]:before {
  background: var(--theme-primary-color);
  border-width: 1px;
  transition: background-color 200ms ease-in-out;
  border: 2px solid var(--theme-primary-color);
}
.md-task-list-item>input[checked]+p {
  color: var(--checked-text-color);
  text-decoration: line-through;
  text-decoration-color: var(--line-through-color);
}

.md-task-list-item>input:checked:after,
.md-task-list-item>input[checked]:after {
  opacity: 1;
}
.md-task-list-item>input:after {
  opacity: 1;
  -webkit-transition: opacity 0.05s ease-in-out;
  -moz-transition: opacity 0.05s ease-in-out;
  transition: opacity 0.05s ease-in-out;
  -webkit-transform: rotate(-45deg);
  -moz-transform: rotate(-45deg);
  transform: rotate(-45deg);
  position: absolute;
  top: 0.25rem;
  left: 0.19rem;
  width: 0.6rem;
  height: 0.375rem;
  border: 2px solid var(--white-color);
  border-top: 0;
  border-right: 0;
  content: ' ';
  opacity: 0;
}

/* table */
.md-table-edit .btn-default {
  color: inherit;
}
table.md-table {
  width: auto;
  min-width: 80%;
}
table tr:nth-child(2n), table thead  {
  background-color: var(--table-cell-bg-color);
}
table thead {
  font-weight: 900;
}

table tbody tr {
  border-bottom: 1px solid var(--table-border-color);
}
table tr:first-of-type {
  border-top: 1px solid var(--table-border-color);
}
table tr th, table tr td {
  border-left: 1px solid var(--table-border-color);
  padding: 6px 13px;
}
table tr th:last-of-type, table tr td:last-of-type {
  border-right: 1px solid var(--table-border-color);
}

/* code */
.auto-suggest-container {
  border: 1px solid var(--theme-primary-color);
}
.auto-suggest-container li:hover, .auto-suggest-container li.active {
  color: #fff;
  background: var(--theme-primary-color);
}


/* outline */
#toc-dropmenu {
  width: 400px;
}
#toc-dropmenu.open {
  background: var(--side-bar-bg-color);
  color: var(--white-color);
}
#toc-dropmenu .outline-title-wrapper .outline-title {
  font-weight: 900;
}
#toc-dropmenu .outline-title-wrapper {
  height: 2.5rem;
}
.outline-title-wrapper .btn {
  color: var(--white-color);
  line-height: 2.5rem;
  vertical-align: middle;
}

.dropdown-menu .divider {
  background: var(--white-color);
}
.outline-item:hover {
  background: var(--active-file-bg-color);
}
.outline-expander {
  display: inline-block;
  margin-right: 0.4rem;
}
.outline-label {
  display: inline-block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: calc(100% - 1.5rem);
}
.outline-label:hover {
  text-decoration: none;
}


/* notification */
#md-notification:before {
  top: 18px;
}
#md-notification p {
  color: var(--theme-primary-color);
  font-weight: 500;
}
.btn-default {
  background: var(--theme-primary-color);
  color: var(--white-color);
}
.btn-default.active, .btn-default.focus, .btn-default:active,
.btn-default:focus, .btn-default:hover,
.open>.dropdown-toggle.btn-default {
  color: var(--theme-primary-color);
  border: 1px solid var(--theme-primary-color);
  background: var(--white-color);
}


/* sidebar */
.sidebar-menu {
  color: var(--siderbar-dropdown-menu-text-color);
}
.sidebar-menu .sidebar-content  .sidebar-content-content {
  font-weight: 500;
}

#file-library-tree .file-tree-node {
  padding-left: 1.5em;
  color: var(--control-text-color);
  padding-top: 6px;
  white-space: nowrap;
  line-height: 1.5;
}
.file-tree-node .file-node-content:hover {
  cursor: pointer;
}
#file-library-tree .file-node-expanded>.file-node-content>.fa-folder:before {
  content: '\f07c';
}
#file-library-tree .fa-file-text-o:before {
  content: '\f1ce'
}

.file-tree-node.active>.file-node-background {
  border-left: 4px solid var(--theme-primary-color);
}
#typora-sidebar .file-list-item.file-library-node:not(.active):hover {
  background: var(--active-file-bg-color);
}
#typora-sidebar .file-tree-node.file-library-file-node:not(.active):hover .file-node-background {
  background: var(--active-file-bg-color);
  height: 2.2rem;
}

/* siderbar footer*/
.sidebar-footer-main-item #sidebar-files-menu {
  border: 1px solid var(--sidebar-footer-dropdown-menu-border-color);
}
.sidebar-menu  .dropdown-menu>li>a, .sidebar-menu .dropdown-menu>li>a:focus, .sidebar-menu .dropdown-menu>li>a:hover {
  color: var(--siderbar-dropdown-menu-text-color);
}
.dropdown-menu>li>a:hover {
  background: var(--active-file-bg-color);
}
.sidebar-footer-main-item .dropdown-menu .menuitem-group-label {
  font-weight: 500;
}
.dropdown-menu .selected-folder-menu-item a:after {
  color: var(--theme-primary-color);
}
.file-sort-item .ty-side-sort-btn {
  cursor: pointer;
}
#sidebar-files-menu>.show+.menuitem-group-label.show {
  border-top: 1px solid var(--sidebar-footer-dropdown-menu-item-border-color);
}
.footer-item:hover, .sidebar-footer-item:hover {
  background: var(--sidebar-footer-item-hover-bg-color);
}

/* sidebar search*/
.sidebar-menu .ty-sidebar-search-panel #file-library-search-input {
  color: var(--white-color);
  background: transparent;
}


/* resizer */
#typora-sidebar-resizer.dragging{
  color: var(--sidebar-resizer);
}


/* print style */
@media print {
  .typora-export * {
    -webkit-print-color-adjust: exact;
  }

  #write>h1::before, #write>h2::before, #write>h3::before, #write>h4::before, #write>h5::before, #write>h6::before {
    content: '';
    bottom: 1rem;
  }

  #write u {
    text-decoration: none;
  }
  #write u>span {
    border-bottom: 1px solid;
  }
}


/* source code */
#typora-source {
  font-family: 'SourceHanSansSC','JetBrains Mono', -apple-system, sans-serif;
  line-height: 1.6;
}
#typora-source .cm-header {
  color: var(--theme-primary-color);
}
